package com.saturn.titan.core.rest;

/**
 * 提供 master rest 服务
 */
public enum MasterRestMethods implements RestMethod {

	// 根据任务分配策略分配任务
	REQUEST_DISPATCH_TASKS("/master/dispatchTask/requestDispatchTasks", "POST"),
	
	// 重置任务状态, 导致不能再次分配
	REVERT_DISPATH_TASKS_BY_SLAVEID("/master/dispatchTask/revertDispathTasksBySlaveId", "GET"),
	
	// 向master报告爬虫执行状态
	REPORT_SLAVE_STAT("/master/node/reportStat", "POST"),
	
	// 提供所有元搜索任务
	REQUEST_ALL_METASEARCH_TASK("/master/dispatchTask/requestAllMetaSearchTask", "GET"),
	
	// 获取节点信息
	GET_ALL_PARSER_FILE_NAME("/master/parser/getAllParserFileName", "GET"),
	
	//下载插件
	DOWNLOAD_FILE("/master/parser/downLoadFile", "GET"),
	
	// 获取master插件文件名列表
	FIND_NODE_BY_ID("/master/node/findNodeById", "GET"),
	
	// 获取插件下载地址
	GET_PLUGIN_MANANGER_URL("/master/parser/getPluginManangerUrl", "GET");
	
	private String methodName;
	
	private String methodType;

	private MasterRestMethods(String methodName, String methodType) {
		this.methodName = methodName;
		this.methodType = methodType;
	}

	public String getMethodName() {
		return methodName;
	}

	public String getMethodType() {
		return methodType;
	}
	
}
